<?php
abstract class MFormInput extends MFormElement {

    public function setValue($_value) {
        parent::setValue($_value);
        $this->setHtmlOption('value', $_value);
        return $this;
    }

    public function getCleanedValue($value) {
        return trim($value);
    }

    public function render() {
//        $return = '<p>'.self::EOL;
        $return = '';
        if (($this->_htmlOptions['type'] !== MForm::ELEMENT_HIDDEN) && !empty($this->_label)){
            $return .= self::TAB.'<label for="'.$this->getHtmlOption('name').'"'.(($this->getForm()->useFormee)?' class="form-lbl"':NULL).'>'.
                    $this->_label.(($this->_required)?'<span class="form-req"> * </span>':NULL).
                    '</label>'.self::EOL;
        }
        $return .= self::TAB.'<input'.$this->renderHtmlOptions().' />'.self::EOL;
//        $return .= '</p>'.self::EOL;
        return $return;
    }

}
?>
